import type { RouteRecordStringComponent } from '@vben/types';

import { baseRequestClient, requestClient } from '#/api/request';
// 获取省份
export async function getProvince() {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/khzywh/getVillageBelongProvinceNameAndID`,
  );
}
// 获取城市
export async function getCity(provinceId: null | number | string) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/khzywh/getVillageBelongCityNameAndID?provinceId=${provinceId}`,
  );
}
// 获取区县
export async function getArea(cityId: null | number | string) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/khzywh/getVillageBelongCountyNameAndID?cityId=${cityId}`,
  );
}
